import request from '@/utils/request'

// 直接售药
export function medicine(data) {
  return request({
    url: '/admin/charge/medicine',
    method: 'post',
    timeout:90000,
    data
  })
}

//列表
export function medicineList(data) {
  return request({
    url: '/admin/charge/medicine/list',
    method: 'post',
    data
  })
}

//结算
export function medicineCharge(data) {
  return request({
    url: '/admin/charge/clear',
    method: 'post',
    timeout: 90000,
    data
  })
}

//已收费/已退费详情
export function medicineDetail(id,status) {
  return request({
    url: '/admin/charge/medicine/detail/' + id + '/' + status,
    method: 'get',
  })
}

//代付款详情
export function medicinePayDetail(id) {
  return request({
    url: '/admin/charge/pay/' + id,
    method: 'get',
  })
}

//退费
export function medicineRefundDetail(id) {
  return request({
    url: '/admin/charge/refund/' + id,
    method: 'get',
  })
}

//发药详情
export function medicineIssueDetail(id) {
  return request({
    url: '/admin/charge/medicine/detail/' + id,
    method: 'get',
  })
}

//发药
export function medicineInventory(data) {
  return request({
    url: '/admin/charge/medicine/inventory',
    method: 'post',
    data:data
  })
}
